﻿using Md.Api.Model;
using Md.Api.Model.Web.MdNavigation.Request;
using Md.Api.Service.Web.MdNavigation;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;

namespace Md.Api.Controllers.Web;
/// <summary>
/// PC导航管理
/// </summary>
[ApiController]
[Produces("application/json")]
[Route("md-api/web/navigation")]
public class MdNavigationWebController : ControllerBase
{
    /// <summary>
    /// 获取网站导航列表服务
    /// </summary>
    public GetMdNavigationListWebService getMdNavigationListWebService { get; set; }
    /// <summary>
    /// 获取网站导航列表
    /// </summary>
    /// <param name="model">请求实体</param>
    /// <returns>ResponseMessageModel</returns>
    [Route("list"), HttpPost, AllowAnonymous]
    public async Task<ResponseMessageModel> GetMdNavigationListWeb([FromBody] RequestGetMdNavigationListWebModel model)
    {
        return await Task.Run(() => getMdNavigationListWebService.Execute(model));
    }
}
